package com.qf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import lombok.Data;


/**
   @author KING
   @ClassName: com.qf.entity.OrderItem
   @Description: 该类的功能描述
   @date: 2021/10/27 21:23 
*/
    

/**
    * 订单中所包含的商品
 * @author 86155
 */
@Data
@TableName(value = "t_order_item")
public class OrderItem {
    /**
     * 订单商品表id
     */
    @TableId(value = "order_item_id", type = IdType.ASSIGN_ID)
    private Long orderItemId;

    /**
     * 订单id
     */
    @TableField(value = "order_id")
    private Long orderId;

    /**
     * 订单编号
     */
    @TableField(value = "order_no")
    private String orderNo;

    /**
     * 商品id
     */
    @TableField(value = "product_id")
    private Long productId;

    /**
     * 商品主图片
     */
    @TableField(value = "product_photo")
    private String productPhoto;

    /**
     * 商品标题
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 销售价格
     */
    @TableField(value = "product_price")
    private BigDecimal productPrice;

    /**
     * 购买数量
     */
    @TableField(value = "product_quantity")
    private Integer productQuantity;

    /**
     * 商品分类id
     */
    @TableField(value = "product_category_id")
    private Long productCategoryId;

    /**
     * 商品促销分解金额
     */
    @TableField(value = "promotion_amount")
    private BigDecimal promotionAmount;

    /**
     * 优惠券优惠分解金额
     */
    @TableField(value = "coupon_amount")
    private BigDecimal couponAmount;

    /**
     * 积分优惠分解金额
     */
    @TableField(value = "integration_amount")
    private BigDecimal integrationAmount;

    /**
     * 该商品经过优惠后的分解金额
     */
    @TableField(value = "real_amount")
    private BigDecimal realAmount;

    /**
     * 商品销售属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]
     */
    @TableField(value = "product_attr")
    private String productAttr;
}